import request from '@/utils/request.js'
//编写查询轮播图的方法
export const getSwiperApi=()=>request.get('api/home/index/slide')
//编写首页推荐的方法
export const getRecomApi=()=>request.get('api/home/index/recom')
//编写首页商品信息
export const getGoodsLevelApi=()=>request.get('api/home/index/goodsLevel')
//编写查询左侧分类的方法
export const getLeftMenusApi=()=>request.get('api/home/category/menu')
//编写获取分类右侧的商品信息
export const getProductByRightCategoryApi=(cid)=>request.get('api/home/category/show',{cid})
//查看商品详情
export const getProductDetailApi=(gid)=>request.get('api/home/goods/info',{gid,type:'details'})
//查询商品的评价
export const getReviewsByGid=(data)=>request.get('api/home/reviews/index',data)
//热门搜索
export const getHotwordsaApi=()=>request.get('api/home/public/hotwords')
//查询商品信息
export const searchProductByCodition=(data)=>request.get('api/home/goods/search',data)
//查询指定商品的规格信息
export const getProductSpecApi=(gid)=>request.get('api/home/goods/info',{gid,type:'spec'})